﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Template.Core.Controllers
{
    /// <summary>
    /// 演示控制器
    /// </summary>
    [Route("[controller]")]
    public class HomeController : Controller
    {
        /// <summary>
        /// 注入NLog，日志开启
        /// </summary>
        private readonly ILogger<HomeController> _logger;

        public HomeController(ILogger<HomeController> logger)
        {
            _logger = logger;
        }

        /// <summary>
        /// 演示方法
        /// </summary>
        /// <returns></returns>
        [Route("[action]")]
        [HttpGet]
        public IActionResult Index()
        {
            return Json("Hello world!");
        }
    }
}
